systemd.network.netdevs.<name>.wireguardConfig

Each attribute in this set specifies an option in the [WireGuard] section of the unit. See systemd.netdev(5) for details. Use PrivateKeyFile instead of PrivateKey: the nix store is world-readable.

Type
attribute set of (systemd option)
Default
{ }
Example
{
  FirewallMark = 42;
  ListenPort = 51820;
  PrivateKeyFile = "/etc/wireguard/secret.key";
}
Declared
<nixpkgs/nixos/modules/system/boot/networkd.nix>